package com.zhijian.warehouse.manage.service;

import com.zhijian.util.page.Page;
import com.zhijian.warehouse.manage.entity.po.WarehouseLocation;
import com.zhijian.warehouse.manage.entity.vo.request.WarehouseLocationSaveOrUpdateVo;
import com.zhijian.warehouse.manage.entity.vo.request.WarehouseLocationSearchVo;
import com.zhijian.warehouse.manage.entity.vo.response.WarehouseLocationVo;

import java.util.List;

/**
 * 仓库库位 业务处理层
 *
 * @author auto
 * @version 1.0
 * @date 2024-10-10 19:40:29
 */
public interface WarehouseLocationService {

    /**
     * 主键查询
     *
     * @param id
     * @return
     */
    WarehouseLocation selectById(Long id);

    /**
     * 主键查询vo
     *
     * @param id
     * @return
     */
    WarehouseLocationVo selectVoById(Long id);

    /**
     * 按照主键删除
     *
     * @param id
     */
    void deleteById(Long id);

    /**
     * 按照主键批量删除
     *
     * @param idList
     */
    void deleteByIdList(List<Long> idList);

    /**
     * 新增
     *
     * @param warehouseLocation
     * @return
     */
    Long insert(WarehouseLocation warehouseLocation);

    /**
     * 动态新增
     *
     * @param warehouseLocation
     * @return
     */
    Long insertSelective(WarehouseLocation warehouseLocation);

    /**
     * 更改
     *
     * @param warehouseLocation
     * @return
     */
    boolean update(WarehouseLocation warehouseLocation);

    /**
     * 动态修改
     *
     * @param record
     * @return
     */
    boolean updateByPrimaryKeySelective(WarehouseLocation record);

    /**
     * 保存
     *
     * @param saveOrUpdateVo
     * @return
     */
    boolean save(WarehouseLocationSaveOrUpdateVo saveOrUpdateVo);

    /**
     * 编辑
     *
     * @param saveOrUpdateVo
     * @return
     */
    boolean modify(WarehouseLocationSaveOrUpdateVo saveOrUpdateVo);

    /**
     * 列表
     *
     * @param warehouseLocationSearchVo
     * @return
     */
    WarehouseLocationVo selectOne(WarehouseLocationSearchVo warehouseLocationSearchVo);

    /**
     * 总数
     *
     * @param warehouseLocationSearchVo
     * @return
     */
    Integer count(WarehouseLocationSearchVo warehouseLocationSearchVo);

    /**
     * 列表
     *
     * @param warehouseLocationSearchVo
     * @return
     */
    List<WarehouseLocationVo> selectList(WarehouseLocationSearchVo warehouseLocationSearchVo);

    /**
     * 分页查询
     *
     * @param warehouseLocationSearchVo
     * @return
     */
    Page<WarehouseLocationVo> selectPage(WarehouseLocationSearchVo warehouseLocationSearchVo);

    /**
     * 批量新增数据（MyBatis原生foreach方法）
     *
     * @param entities 实例对象列表
     * @return 影响行数
     */
    boolean insertBatch(List<WarehouseLocation> entities);


    /**
     * 切换状态
     *
     * @param id
     * @param status
     */
    void changeStatus(Long id, Byte status);

    /**
     * 绑定条码
     *
     * @param param
     * @return
     */
    boolean bindingBarcode(WarehouseLocationSaveOrUpdateVo param);

    /**
     * 根据条码查询库位信息
     *
     * @param param
     * @return
     */
    WarehouseLocationVo selectByBarCode(WarehouseLocationSearchVo param);
}